package com.hyjx.framework.component.interfaceservice.datauser;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hyjx.framework.component.interfaceservice.dataservice.DataServiceModel;
import com.hyjx.framework.orm.BaseService;
import com.hyjx.framework.orm.dao.IBaseDao;
import org.springframework.transaction.annotation.Transactional;

/**
 * 数据服务用户--服务实现类
 */
@Service
@Transactional
public class DataUserServiceImpl extends BaseService implements DataUserService {
	
	@Resource
	private IBaseDao dao;

	/**
	 * 用户名称限制
	 * @param model
	 * @return
	 */
	public int userNameLimit(DataUserModel model){
		String temp= (String) dao.queryObject(model.getModuleName() + ".usernamelimit",model);
		int count=Integer.parseInt(temp);
		return count;
	}

	/**
	 * 测试方法
	 */
	public void testMultiDs(){
		
		List<Person> p=dao.queryObjectList(new DataUserModel().getModuleName() + ".testMultiDs", null);
		int a=p.size();
		for(int i=0;i<p.size();i++){
			Person person=p.get(i);
			String s=person.toString();
			System.out.println(s);
		}
	}
	
	public List queryListAmq() {
		List list=dao.queryObjectList(new DataUserModel().getModuleName() + ".queryListAmq");
		return list;
	}
}
